package com.liu.mybatisplusdemo.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.liu.mybatisplusdemo.entity.Person;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PersonMapper extends BaseMapper<Person> {

    //与数据库交互
    IPage<Person> findPage(IPage<Person> page, @Param(Constants.WRAPPER) QueryWrapper<Person> wrapper);

    List<Person> findALL();
}
